<?php
defined('BASEPATH') OR exit('No direct script access allowed');

class Question extends Eloquent
{
    protected $table = 'question';
    
    protected $timestamps = TRUE;
    
    public function get_user()
    {
        return $this->belongs_to('user', 'id', 'uid');
    }
    
//     public 
    
    public function get_topic()
    {
        return $this->belongs_to_many('topic', 'question_topic', 'qid', 'tid')->with_timestamps();
    }
}